<%--
  Created by IntelliJ IDEA.
  User: jshand
  Date: 2022-03-25
  Time: 8:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<form action="${pageContext.request.contextPath}/user/update" method="post">
    <input type="hidden" name="userId" value="${user.userId}" />

    <table width="500px" cellspacing="0" cellpadding="0" border="1">
        <tr>
            <td>用户名</td>
            <td><input type="text" name="username" value="${user.username}" /> </td>
        </tr>
        <tr>
            <td>密码</td>
            <td><input type="text" name="password" value="${user.password}" /> </td>
        </tr>
        <tr>
            <td>昵称</td>
            <td><input type="text" name="realname" value="${user.realname}"/> </td>
        </tr>
        <tr>
            <td>电话号</td>
            <td><input type="text" name="telephone" value="${user.telephone}"/> </td>
        </tr>
        <tr>
            <td>是否有效</td>
            <td>
                <select name="active">
                    <option value="">请选择</option>
                    <option value="1"  <c:if test="${user.active == 1}">selected</c:if>  >有效</option>
                    <option value="0"  <c:if test="${user.active == 0}">selected</c:if>  >无效</option>
                </select>
<%--         <input type="text" name="active"/> </td>--%>
        </tr>
        <tr>
            <td>创建时间(yyyy-MM-dd HH:mm:ss)</td>
            <td><input type="text" name="createTime"  value="<fmt:formatDate value="${user.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/> </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="更新" />
            </td>
        </tr>
    </table>


</form>

</body>
</html>
